<script setup lang="ts">
import { ListenerProp } from '@varlet/ui';
import { defineComponent ,ref} from 'vue';


defineComponent({ name: 'ModalError' });
defineProps<{
    show?: boolean;
    content?: string;
    /**
     * 确认按钮文字
     */
    okText?: string;
    /**
     * 确认按钮事件
     */
    onOk?: ListenerProp<($event: any) => void>;
    /**
     * 隐藏取消按钮
     */
    hideCancel?: boolean;
    /**
     * 显示按钮文字
     */
    cancelText?: string;
    /**
     * 取消按钮事件
     */
    onCancel?: ListenerProp<() => void>;
    /**
     * 关闭按钮事件
     */
    onClose?: ListenerProp<() => void>;
    onClickOverlay?: ListenerProp<() => void>;
    'onUpdate:show'?: ListenerProp<(show: boolean) => void>;
}>();

// 定义外部事件
const emit = defineEmits(['update:show', 'close', 'cancel', 'ok']);

const onClose = () => {
    emit('close');
    emit('update:show', false);
};
const onOk = () => {
    emit('ok');
    emit('update:show', false);
};

</script>
<template>

</template>
<style lang="scss" scoped>

</style>
<style lang="scss">

</style>
